<%@ page import="net.zjitc.daomain.User" %><%--
  Created by IntelliJ IDEA.
  User: hasee
  Date: 2017/9/26
  Time: 13:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        User user = (User) request.getSession().getAttribute("user");
        if(user == null){
            request.setAttribute("error","请先登录");
            request.getRequestDispatcher("/log/login.jsp").forward(request,response);
        }
        String username = user.getUsername();
    %>
    <h1>欢迎您: <%= username%></h1>
    <a href="/web/logoutServlet">注销</a>
</body>
</html>
